#ifndef RS_POINT3_H
#define RS_POINT3_H

#include "Vector3.h"


namespace rs
{

//! 3D point class. (internally 4D vector with w=1)
RS_ALIGN_BEGIN(16)
class Point3
{
	friend class Vector3;
//;	friend Point3 operator*(const Matrix& lhs, const Point3& rhs);

public:
	//! constructor.
	Point3();
	Point3(f32 x, f32 y, f32 z);
	Point3(const Point3& rhs);

	//! operators.
	Point3& operator=(const Point3& rhs);
	Point3& operator+=(const Vector3& rhs);
	Point3& operator-=(const Vector3& rhs);

	//! set all elements.
	void set(f32 x, f32 y, f32 z);

	//! get each element.
	f32 getX() const;
	f32 getY() const;
	f32 getZ() const;

private:
	f32	x, y, z, w;
} RS_ALIGN_END(16);

// operators.
Point3 operator+(const Vector3& lhs, const Point3& rhs);
Point3 operator+(const Point3& lhs, const Vector3& rhs);
Vector3 operator-(const Point3& lhs, const Point3& rhs);

} // namespace rs

// implementation
#ifdef RS_MATH_USE_C
#include "Point3_C.h"
#endif

#endif // #ifndef RS_POINT3_H
